<!DOCTYPE html>
<html>
<head>
    <title></title>
		<#include "/header.html">

            <style>
                .left {
                    float: left;
                    width: 17%;
                    height: 100%;
                }
                .right {
                    width: 83%;
                    margin-left: 17.2%;
                    height: 100%;
                    border-left: 1.1px solid #1b1b19;
                }
                .middle {
                    width: 100%;
                    height: 100%;
                    border-top: 1.1px solid #1b1b19;
                }
                .ke-dialog-default{
                    top: 222px;
                }
            </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div class="left">
        <div>
            <a id="pcadd" @click="addcategroy"><i class="fa fa-plus" ></i>&nbsp;新增</a>
            <a id="pcmod" @click="modcategroy"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            <a id="pcdel" @click="delcategroy"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
        </div>
        <div class="col-sm-10">
            <ul id="CategoryZtree" class="ztree"></ul>
        </div>
    </div>
    <div id="categadd" class="panel panel-default" style="display:none">
        <form class="form-horizontal">

            <div  v-show="clickTreeNode.pid == 0" class="form-group">
                <div class="col-sm-2 control-label">上级分类:</div>
                <div class="col-sm-10">
                    <p> {{clickTreeNode.name}}</p>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">分类名称:</div>
                <div class="col-sm-10">
                    <input id="newname" type="text" class="form-control" placeholder="分类名称"/>
                </div>
            </div>
        </form>
    </div>
    <div id="categgmod" class="panel panel-default" style="display:none">
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">原名称:</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control"  v-model="clickTreeNode.name" readonly/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">新名称:</div>
                <div class="col-sm-10">
                    <input type="text" id="oldname" class="form-control" placeholder="新分类名称"/>
                </div>
            </div>
        </form>
    </div>
    <div id="showtable" class="right">
        <div class="panel-heading">{{title}}</div>
         <div  class="grid-btn">
             <div class="form-group col-sm-2">
                 <input type="text" class="form-control" v-model="q.name" @keyup.enter="query" placeholder="产品名">
             </div>
             <a class="btn btn-default" @click="query">查询</a>
             <#if shiro.hasPermission("sys:btnavbar:save")>
                 <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
             </#if>
             <#if shiro.hasPermission("sys:btnavbar:update")>
                 <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
             </#if>
             <#if shiro.hasPermission("sys:btnavbar:delete")>
                 <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
             </#if>
         </div>
         <table id="jqGrid"></table>
         <div id="jqGridPager"></div>
     </div>
     <div id="unshowtable" class="right">
         <strong class="col-sm-5 control-label" style="font-size: 16px;">没有产品列表！！</strong>
     </div>

</div>
<!-- 选择部门 -->
<div id="deptLayer" style="display: none;padding:10px;">
    <ul id="deptTree" class="ztree"></ul>
</div>
<script src="${request.contextPath}/statics/js/modules/sys/btnavbar.js?_${.now?long}"></script>
</body>
</html>